/* 
 * Description:
 * Titles vector. I/O operations
 * 
 * File:   TitleList.h
 * Author: yanex
 */

#ifndef TITLELIST_H
#define	TITLELIST_H

#define ANIME_WATCHED 0
#define ANIME_TODO 1
#define ANIME_ALL 2
#define TIME_MINUTE 0
#define TIME_HOUR 1
#define TIME_DAY 2
#define TIME_MONTH 3
#define TIME_YEAR 4

using namespace std;
#include <vector>
#include <string>
#include <cstring>
#include <iostream>
#include <fstream>
#include <cstddef>
#include <algorithm>
#include <locale>

#include "Title.h"

#define DEFAULT_TIME 25

using namespace std;

class TitleList {
public:
    TitleList(string filename);
    int count(int type);
    double time(int type);
    void check(string title, ostream& stream);
    void add(string param, string title);
    void set(string param, string title);
    void print(int type, ostream& stream);
    ~TitleList();
private:
    int testTimeMarker(string test);
    void save();
    string filename;
    vector<Title> items;
    int watchedCount, todoCount;
    double t;
};

#endif	/* TITLELIST_H */

